<?php

// $id = $_GET['id'];

// $sql = "select * from stu where id=".$id;

// var_dump($sql);

include 'Db.class.php';

$data = Db::query("select * from stu");

$data = Db::exec("update stu set age=age+10 where cid=10");

// 查询
$data = Db::table('stu')->find();

$data = Db::table('stu')->findAll();

//删除 

$data = Db::table('stu')->delete(56);

$data = Db::table('stu')->where(['sex'=>'男'])->delete();

// 增加
$data = Db::table('stu')->insert($_POST);

// 修改

$data = Db::table('stu')->where(['id'=>7])->update($_POST);